Integrand size = 38, antiderivative size = 111 \[ \int \cos (c+d x) (a+a \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=a^3 B x+\frac {a^3 (7 B+5 C) \text {arctanh}(\sin (c+d x))}{2 d}+\frac {5 a^3 (B+C) \tan (c+d x)}{2 d}+\frac {a C (a+a \sec (c+d x))^2 \tan (c+d x)}{3 d}+\frac {(3 B+5 C) \left (a^3+a^3 \sec (c+d x)\right ) \tan (c+d x)}{6 d} \]
[Out]
Time = 0.23 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {4157, 4002, 3999, 3852, 8, 3855} \[ \int \cos (c+d x) (a+a \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a^3 (7 B+5 C) \text {arctanh}(\sin (c+d x))}{2 d}+\frac {5 a^3 (B+C) \tan (c+d x)}{2 d}+\frac {(3 B+5 C) \tan (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{6 d}+a^3 B x+\frac {a C \tan (c+d x) (a \sec (c+d x)+a)^2}{3 d} \]
[In]
[Out]
Rule 8
Rule 3852
Rule 3855
Rule 3999
Rule 4002
Rule 4157
Rubi steps \begin{align*} \text {integral}& = \int (a+a \sec (c+d x))^3 (B+C \sec (c+d x)) \, dx \\ & = \frac {a C (a+a \sec (c+d x))^2 \tan (c+d x)}{3 d}+\frac {1}{3} \int (a+a \sec (c+d x))^2 (3 a B+a (3 B+5 C) \sec (c+d x)) \, dx \\ & = \frac {a C (a+a \sec (c+d x))^2 \tan (c+d x)}{3 d}+\frac {(3 B+5 C) \left (a^3+a^3 \sec (c+d x)\right ) \tan (c+d x)}{6 d}+\frac {1}{6} \int (a+a \sec (c+d x)) \left (6 a^2 B+15 a^2 (B+C) \sec (c+d x)\right ) \, dx \\ & = a^3 B x+\frac {a C (a+a \sec (c+d x))^2 \tan (c+d x)}{3 d}+\frac {(3 B+5 C) \left (a^3+a^3 \sec (c+d x)\right ) \tan (c+d x)}{6 d}+\frac {1}{2} \left (5 a^3 (B+C)\right ) \int \sec ^2(c+d x) \, dx+\frac {1}{2} \left (a^3 (7 B+5 C)\right ) \int \sec (c+d x) \, dx \\ & = a^3 B x+\frac {a^3 (7 B+5 C) \text {arctanh}(\sin (c+d x))}{2 d}+\frac {a C (a+a \sec (c+d x))^2 \tan (c+d x)}{3 d}+\frac {(3 B+5 C) \left (a^3+a^3 \sec (c+d x)\right ) \tan (c+d x)}{6 d}-\frac {\left (5 a^3 (B+C)\right ) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{2 d} \\ & = a^3 B x+\frac {a^3 (7 B+5 C) \text {arctanh}(\sin (c+d x))}{2 d}+\frac {5 a^3 (B+C) \tan (c+d x)}{2 d}+\frac {a C (a+a \sec (c+d x))^2 \tan (c+d x)}{3 d}+\frac {(3 B+5 C) \left (a^3+a^3 \sec (c+d x)\right ) \tan (c+d x)}{6 d} \\ \end{align*}
Time = 1.09 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.63 \[ \int \cos (c+d x) (a+a \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a^3 \left (6 B d x+3 (7 B+5 C) \text {arctanh}(\sin (c+d x))+3 (6 B+8 C+(B+3 C) \sec (c+d x)) \tan (c+d x)+2 C \tan ^3(c+d x)\right )}{6 d} \]
[In]
[Out]
Time = 0.43 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.55
method | result | size |
parallelrisch | \(\frac {a^{3} \left (-\frac {21 \left (\frac {\cos \left (3 d x +3 c \right )}{3}+\cos \left (d x +c \right )\right ) \left (B +\frac {5 C}{7}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2}+\frac {21 \left (\frac {\cos \left (3 d x +3 c \right )}{3}+\cos \left (d x +c \right )\right ) \left (B +\frac {5 C}{7}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2}+B x d \cos \left (3 d x +3 c \right )+\left (B +3 C \right ) \sin \left (2 d x +2 c \right )+\left (3 B +\frac {11 C}{3}\right ) \sin \left (3 d x +3 c \right )+3 B x d \cos \left (d x +c \right )+3 \sin \left (d x +c \right ) \left (B +\frac {5 C}{3}\right )\right )}{d \left (\cos \left (3 d x +3 c \right )+3 \cos \left (d x +c \right )\right )}\) | \(172\) |
derivativedivides | \(\frac {B \,a^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-a^{3} C \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+3 B \,a^{3} \tan \left (d x +c \right )+3 a^{3} C \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+3 B \,a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+3 a^{3} C \tan \left (d x +c \right )+B \,a^{3} \left (d x +c \right )+a^{3} C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(176\) |
default | \(\frac {B \,a^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-a^{3} C \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+3 B \,a^{3} \tan \left (d x +c \right )+3 a^{3} C \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+3 B \,a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+3 a^{3} C \tan \left (d x +c \right )+B \,a^{3} \left (d x +c \right )+a^{3} C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(176\) |
risch | \(a^{3} B x -\frac {i a^{3} \left (3 B \,{\mathrm e}^{5 i \left (d x +c \right )}+9 C \,{\mathrm e}^{5 i \left (d x +c \right )}-18 B \,{\mathrm e}^{4 i \left (d x +c \right )}-18 C \,{\mathrm e}^{4 i \left (d x +c \right )}-36 B \,{\mathrm e}^{2 i \left (d x +c \right )}-48 C \,{\mathrm e}^{2 i \left (d x +c \right )}-3 B \,{\mathrm e}^{i \left (d x +c \right )}-9 C \,{\mathrm e}^{i \left (d x +c \right )}-18 B -22 C \right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3}}-\frac {7 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{2 d}-\frac {5 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{2 d}+\frac {7 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{2 d}+\frac {5 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{2 d}\) | \(221\) |
norman | \(\frac {a^{3} B x +a^{3} B x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}+\frac {a^{3} \left (7 B +11 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-3 a^{3} B x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+2 a^{3} B x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+2 a^{3} B x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-3 a^{3} B x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}-\frac {5 a^{3} \left (B +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{d}-\frac {2 a^{3} \left (B +3 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}-\frac {4 a^{3} \left (9 B +10 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}+\frac {4 a^{3} \left (9 B +10 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{3 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{4}}-\frac {a^{3} \left (7 B +5 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d}+\frac {a^{3} \left (7 B +5 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d}\) | \(304\) |
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.27 \[ \int \cos (c+d x) (a+a \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {12 \, B a^{3} d x \cos \left (d x + c\right )^{3} + 3 \, {\left (7 \, B + 5 \, C\right )} a^{3} \cos \left (d x + c\right )^{3} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (7 \, B + 5 \, C\right )} a^{3} \cos \left (d x + c\right )^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (2 \, {\left (9 \, B + 11 \, C\right )} a^{3} \cos \left (d x + c\right )^{2} + 3 \, {\left (B + 3 \, C\right )} a^{3} \cos \left (d x + c\right ) + 2 \, C a^{3}\right )} \sin \left (d x + c\right )}{12 \, d \cos \left (d x + c\right )^{3}} \]
[In]
[Out]
\[ \int \cos (c+d x) (a+a \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=a^{3} \left (\int B \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 3 B \cos {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int 3 B \cos {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int B \cos {\left (c + d x \right )} \sec ^{4}{\left (c + d x \right )}\, dx + \int C \cos {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int 3 C \cos {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int 3 C \cos {\left (c + d x \right )} \sec ^{4}{\left (c + d x \right )}\, dx + \int C \cos {\left (c + d x \right )} \sec ^{5}{\left (c + d x \right )}\, dx\right ) \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 212 vs. \(2 (103) = 206\).
Time = 0.21 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.91 \[ \int \cos (c+d x) (a+a \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {12 \, {\left (d x + c\right )} B a^{3} + 4 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} C a^{3} - 3 \, B a^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 9 \, C a^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 18 \, B a^{3} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 6 \, C a^{3} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 36 \, B a^{3} \tan \left (d x + c\right ) + 36 \, C a^{3} \tan \left (d x + c\right )}{12 \, d} \]
[In]
[Out]
none
Time = 0.34 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.70 \[ \int \cos (c+d x) (a+a \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {6 \, {\left (d x + c\right )} B a^{3} + 3 \, {\left (7 \, B a^{3} + 5 \, C a^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, {\left (7 \, B a^{3} + 5 \, C a^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (15 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 15 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 36 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 40 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 21 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 33 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3}}}{6 \, d} \]
[In]
[Out]
Time = 16.03 (sec) , antiderivative size = 209, normalized size of antiderivative = 1.88 \[ \int \cos (c+d x) (a+a \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2\,B\,a^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {7\,B\,a^3\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {5\,C\,a^3\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {3\,B\,a^3\,\sin \left (c+d\,x\right )}{d\,\cos \left (c+d\,x\right )}+\frac {B\,a^3\,\sin \left (c+d\,x\right )}{2\,d\,{\cos \left (c+d\,x\right )}^2}+\frac {11\,C\,a^3\,\sin \left (c+d\,x\right )}{3\,d\,\cos \left (c+d\,x\right )}+\frac {3\,C\,a^3\,\sin \left (c+d\,x\right )}{2\,d\,{\cos \left (c+d\,x\right )}^2}+\frac {C\,a^3\,\sin \left (c+d\,x\right )}{3\,d\,{\cos \left (c+d\,x\right )}^3} \]
[In]
[Out]